package com.un.ebs.production.dto;

import com.un.ebs.core.validator.NotLessThanZero;
import com.un.ebs.product.enums.ProductBomTypeEnum;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author liubo
 * @email liubocs@163.com
 * @date 2020/8/13 23:16
 */
@Data
public class ProductionOrderAddBySaleDto {

    @NotNull
    private String saleOrderId;

    @NotNull
    private String saleOrderItemId;

    @NotNull
    private String skuId;

    @NotNull(message = "生产BOM类型必须指定。")
    private ProductBomTypeEnum bomType;

    @NotLessThanZero(message = "数量不能为零。")
    private Double qty;

    @NotNull(message = "请指定计划开工日期")
    private Date planStart;

    @NotNull(message = "请指标计划完工日期")
    private Date planEnd;
}
